package com.neusoft.neuiotms.dcam.fixed.vo;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class GoodsFileImportVO implements IExcelDataModel, IExcelModel {

    /** 货品名称 */
    @NotBlank(message = "货品名称不能为空")
    @Length(max = 255, message = "货品名称不能超过{max}位")
    @Excel(name = "货品名", orderNum = "0")
    private String name;

    /** 备品备件类型 */
    @NotNull(message = "备品备件类型不能为空")
    @Excel(name = "备品备件类型", orderNum = "1")
    private String spareTypeName;

    /** 规格型号 */
    @NotBlank(message = "规格型号不能为空")
    @Length(max = 255, message = "规格型号不能超过{max}位")
    @Excel(name = "规格型号", orderNum = "2")
    private String specification;

    /** 描述 */
    @Length(max = 255, message = "描述不能超过{max}位")
    @Excel(name = "描述", orderNum = "4")
    private String description;

    private int rowNum;

    private String errorMsg;

    @Override
    public Integer getRowNum() {
        return this.rowNum;
    }

    @Override
    public void setRowNum(final Integer rowNum) {
        this.rowNum = rowNum;
    }

    @Override
    public String getErrorMsg() {
        return this.errorMsg;
    }

    @Override
    public void setErrorMsg(final String errorMsg) {
        this.errorMsg = errorMsg;
    }

}
